package com.blb.exam.student.service.impl;

import com.blb.common.entity.ExamRecord;
import com.blb.exam.student.dao.ExamRecordDAO;
import com.blb.exam.student.service.ExamRecordService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class ExamRecordServiceImpl implements ExamRecordService {

    @Autowired
    private ExamRecordDAO examRecordDAO;

    @Override
    public List<ExamRecord> findByUserId(Long userId) {
        return examRecordDAO.selectByUserId(userId);
    }

    @Override
    public void addExamRecord(ExamRecord examRecord) {
        examRecordDAO.insert(examRecord);
    }
}
